﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace freshflowersHTK.Models
{
    public class Products
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ProductID { get; set; }

        [Display(Name = "Code")]
        public string ProductCode { get; set; }

        [Display(Name = "Image Path")]
        public string ImagePath { get; set; }

        [Display(Name = "Price")]
        public decimal SalePrice { get; set; }

        [Display(Name = "Price Text")]
        public string SalePriceLiteral { get; set; }

        [Display(Name = "Hot?")]
        public bool IsHotProduct { get; set; }

        [ForeignKey("ProductStatus")]
        public int ProductStatusId { get; set; }
        
        public virtual ProductStatus ProductStatus { get; set; }

        [ForeignKey("Category")]
        public int CategoryId { get; set; }
        
        public virtual Category Category { get; set; }

        [ForeignKey("Catalog")]
        public int CatalogId { get; set; }

        public virtual Catalog Catalog { get; set; }
    }
}